package com.sunop.pantiproblem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunop.panticommon.entity.PageResult;
import com.sunop.panticommon.entity.Result;
import com.sunop.pantiproblem.model.Problem;
import com.sunop.pantiproblem.model.ProblemPageQueryDTO;
import com.sunop.pantiproblem.model.ProblemVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hutao666123
 * @since 2025-03-18
 */
public interface ProblemService extends IService<Problem> {

    PageResult pageQuery(ProblemPageQueryDTO problemPageQuery);

    void saveToES(Integer id, String title, String content);

    List<Integer> getPidByTitle(String title);

    List<ProblemVO> pageQueryByTitle(List<Integer> pidList, int pageNum, int pageSize);

    void setInput(int pid, String language);

    Result collectProblem(Integer problemId);

    Result uncollectProblem(Integer problemId);

    Result getCollectedProblems(int page, int size, boolean reverseOrder);

    long getCollectedCount();

    boolean isProblemCollected(Integer problemId);

    Result problemLike(Integer problemId);

    Result problemUnlike(Integer problemId);

    List<Problem> getProblemsByAI(Integer difficulty, String tag);
}
